/**
 * @title 读取链上数据脚本
 */
const { BigNumber } = require("ethers")
const Web3 = require("web3")
const { byteToString } = require("../utils/StringAndBytes")

// @ts-ignore
const web3 = new Web3(
    // "https://eth-goerli.g.alchemy.com/v2/TPK2tOThACLUon9IEOR0eWOOAe4eyPRN"
    "https://arb-mainnet.g.alchemy.com/v2/KXhL09LbLbG1Uqp-zuK8oec7cnCRzb0F"
    //链上客户端URL
)

//console.log(web3)

async function main() {
    await web3.eth.getStorageAt(
        "0xcE78E6EaB451bd382AAFA4aa72017efDB23CDBcC",
        "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103",
        (err, res) => {
            console.log(res)
        }
    )
    // await web3.eth.getAccounts().then(console.log)
}

main()
    .then(() => process.exit(0))
    .catch((e) => {
        console.log(e)
        process.exit(1)
    })
